//
//  SandBoxStore.h
//  UI17_本地存储数据(sandBox)
//
//  Created by apple on 16/5/25.
//  Copyright © 2016年 apple. All rights reserved.
//

#import <Foundation/Foundation.h>

@import UIKit;

@interface SandBoxStore : NSObject

+ (instancetype)shareSandBoxStore;

- (NSString *)PathForSandBox;
- (NSString *)PathForDocument;
- (NSString *)pathForLibrary;
- (NSString *)pathForCache;
- (NSString *)pathForTmp;
- (NSString *)pathForApp;


#pragma mark - Store

- (BOOL)storeFileWithString:(NSString *)content
                     ForKey:(NSString *)key;

- (BOOL)storeFileWithArray:(NSArray *)content
                    Forkey:(NSString *)key;

- (BOOL)storeFileWithDictionary:(NSDictionary *)content
                         Forkey:(NSString *)key;

- (BOOL)storeFileWithData:(NSData *)content
                   Forkey:(NSString *)key;

- (BOOL)storeFileWithImage:(UIImage *)content
                    Forkey:(NSString *)key;

- (BOOL)storeFileWithImageData:(NSData *)imageData
                        Forkey:(NSString *)key;

- (BOOL)storeByArchiverWithObject:(id)object
                           Forkey:(NSString *)key;


#pragma mark - Read

- (NSString *)readStringForKey:(NSString *)key;

- (NSArray *)readArrayForKey:(NSString *)key;

- (NSDictionary *)readDictionaryForKey:(NSString *)key;

- (NSData *)readDataForKey:(NSString *)key;

- (UIImage *)readImageForKey:(NSString *)key;

- (id)readByUnArchiverWithKey:(NSString *)key;


#pragma mark - NSFileManager

//create
- (BOOL)createDirectoryToDocument:(NSString *)directory;




//delete

- (BOOL)deleteDirctoryInDocument:(NSString *)directory;






@end
